Optimal. Leaf size=70 \[ \frac {(a+i a \tan (c+d x))^m}{d m}-\frac {\, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3608, 3562, 70}
\begin {gather*} \frac {(a+i a \tan (c+d x))^m}{d m}-\frac {(a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d m} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 70
Rule 3562
Rule 3608
Rubi steps
\begin {align*} \int \tan (c+d x) (a+i a \tan (c+d x))^m \, dx &=\frac {(a+i a \tan (c+d x))^m}{d m}-i \int (a+i a \tan (c+d x))^m \, dx\\ &=\frac {(a+i a \tan (c+d x))^m}{d m}-\frac {a \text {Subst}\left (\int \frac {(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {(a+i a \tan (c+d x))^m}{d m}-\frac {\, _2F_1\left (1,m;1+m;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(153\) vs. \(2(70)=140\).
time = 4.97, size = 153, normalized size = 2.19 \begin {gather*} \frac {2^{-1+m} \left (e^{i d x}\right )^m \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^m \left (1+m-e^{2 i (c+d x)} \left (1+e^{2 i (c+d x)}\right )^m m \, _2F_1\left (1+m,1+m;2+m;-e^{2 i (c+d x)}\right )\right ) \sec ^{-m}(c+d x) (\cos (d x)+i \sin (d x))^{-m} (a+i a \tan (c+d x))^m}{d m (1+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.78, size = 0, normalized size = 0.00 \[\int \tan \left (d x +c \right ) \left (a +i a \tan \left (d x +c \right )\right )^{m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{m} \tan {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {tan}\left (c+d\,x\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^m \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________